# Copyright [2025] [OBARA (Nanjing) Electromechanical Co., Ltd]
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.



# Generated by Django 5.2.3 on 2025-06-14 06:25

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True, verbose_name='分类名称')),
                ('description', models.TextField(blank=True, null=True, verbose_name='分类描述')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='最后更新时间')),
                ('parent_category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='children', to='clamps.category', verbose_name='父级分类')),
            ],
            options={
                'verbose_name': '焊钳分类',
                'verbose_name_plural': '焊钳分类',
            },
        ),
        migrations.CreateModel(
            name='Log',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('action_type', models.CharField(max_length=100, verbose_name='操作类型')),
                ('details', models.TextField(blank=True, null=True, verbose_name='操作详情')),
                ('timestamp', models.DateTimeField(auto_now_add=True, verbose_name='操作时间')),
                ('ip_address', models.GenericIPAddressField(blank=True, null=True, verbose_name='IP地址')),
                ('path', models.CharField(blank=True, max_length=255, null=True, verbose_name='访问路径')),
                ('method', models.CharField(blank=True, max_length=10, null=True, verbose_name='HTTP方法')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='操作用户')),
            ],
            options={
                'verbose_name': '操作日志',
                'verbose_name_plural': '操作日志',
                'ordering': ['-timestamp'],
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.TextField(blank=True, null=True, verbose_name='描述')),
                ('drawing_no_1', models.CharField(blank=True, max_length=255, null=True, verbose_name='图号1(o)')),
                ('sub_category_type', models.CharField(blank=True, choices=[('大型', '大型'), ('特殊', '特殊'), ('仙鹤型', '仙鹤型'), ('中小型', '中小型'), ('小型', '小型'), ('中型', '中型'), ('X', 'X'), ('Y', 'Y')], max_length=100, null=True, verbose_name='产品子分类类型')),
                ('stroke', models.FloatField(blank=True, null=True, verbose_name='行程')),
                ('electrode_arm_end', models.CharField(blank=True, choices=[('握杆（铝）', '握杆（铝）'), ('TIP BASE（F 型）', 'TIP BASE（F 型）'), ('握杆（SBA）', '握杆（SBA）'), ('TIP BASE（G 型）', 'TIP BASE（G 型）'), ('GUN HEAD（?36）', 'GUN HEAD（?36）'), ('GUN HEAD（?45）', 'GUN HEAD（?45）'), ('GUN HEAD（?40）', 'GUN HEAD（?40）'), ('GUN HEAD（?50）', 'GUN HEAD（?50）'), ('GUN HEAD（?60）', 'GUN HEAD（?60）'), ('握杆?45（铝）', '握杆?45（铝）'), ('握杆?50（铝）', '握杆?50（铝）'), ('特殊', '特殊'), ('其他', '其他')], max_length=255, null=True, verbose_name='电极臂端部')),
                ('clamping_force', models.FloatField(blank=True, null=True, verbose_name='加压力')),
                ('electrode_arm_type', models.CharField(blank=True, choices=[('焊接', '焊接'), ('型材', '型材')], max_length=100, null=True, verbose_name='电极臂')),
                ('transformer', models.CharField(blank=True, choices=[('ITS85', 'ITS85'), ('DB6-100R1', 'DB6-100R1'), ('RT552', 'RT552'), ('RT752', 'RT752'), ('BOSCH', 'BOSCH'), ('商科', '商科'), ('RT906', 'RT906'), ('RT706', 'RT706'), ('NI110', 'NI110'), ('RT452', 'RT452'), ('DB6-90-510', 'DB6-90-510'), ('DB6', 'DB6'), ('DB6-90', 'DB6-90'), ('SMF-100', 'SMF-100'), ('MF-100', 'MF-100'), ('其他', '其他')], max_length=100, null=True, verbose_name='变压器')),
                ('weight', models.FloatField(blank=True, null=True, verbose_name='重量')),
                ('transformer_placement', models.CharField(blank=True, choices=[('水平', '水平'), ('竖直', '竖直'), ('下置', '下置'), ('上置', '上置'), ('右置', '右置'), ('其他', '其他')], max_length=100, null=True, verbose_name='变压器放置方向')),
                ('flange_pcd', models.CharField(blank=True, choices=[('125', '125'), ('125-160', '125-160'), ('160', '160'), ('200', '200'), ('92', '92'), ('其他', '其他')], max_length=100, null=True, verbose_name='法兰P.C.D')),
                ('bracket_direction', models.CharField(blank=True, choices=[('右', '右'), ('上', '上'), ('前', '前'), ('下', '下'), ('后', '后'), ('三维', '三维'), ('左', '左')], max_length=100, null=True, verbose_name='托架方向')),
                ('bracket_angle', models.FloatField(blank=True, null=True, verbose_name='托架角度')),
                ('motor_manufacturer', models.CharField(blank=True, choices=[('FANUC', 'FANUC'), ('KUKA', 'KUKA'), ('YASKAWA', 'YASKAWA'), ('ABB', 'ABB'), ('TOLOMATIC', 'TOLOMATIC'), ('多摩川', '多摩川'), ('PANASONIC', 'PANASONIC'), ('DIAKONT', 'DIAKONT'), ('SEW', 'SEW'), ('SANYO', 'SANYO'), ('其他', '其他')], max_length=100, null=True, verbose_name='MOTOR厂家')),
                ('bracket_count', models.FloatField(blank=True, null=True, verbose_name='托架个数')),
                ('gearbox_type', models.CharField(blank=True, choices=[('低压', '低压'), ('高压', '高压'), ('联轴器型', '联轴器型'), ('中空', '中空'), ('TOLOMATIC', 'TOLOMATIC'), ('偏心', '偏心'), ('折回', '折回'), ('OBARA-中空', 'OBARA-中空'), ('DIAKONT', 'DIAKONT')], max_length=100, null=True, verbose_name='齿轮箱型式')),
                ('bracket_material', models.CharField(blank=True, choices=[('铝', '铝'), ('SS400', 'SS400')], max_length=100, null=True, verbose_name='托架材料')),
                ('gearbox_stroke', models.CharField(blank=True, max_length=100, null=True, verbose_name='齿轮箱行程')),
                ('tool_changer', models.CharField(blank=True, choices=[('无', '无'), ('有', '有'), ('STAUBLI', 'STAUBLI'), ('NITTA', 'NITTA'), ('ATI-QC210', 'ATI-QC210'), ('ATI-QC310', 'ATI-QC310'), ('其他', '其他')], max_length=100, null=True, verbose_name='换枪装置')),
                ('throat_depth', models.FloatField(blank=True, null=True, verbose_name='喉深')),
                ('has_balance', models.CharField(blank=True, choices=[('有', '有'), ('无', '无')], max_length=100, null=True, verbose_name='有无平衡')),
                ('throat_width', models.FloatField(blank=True, null=True, verbose_name='喉宽')),
                ('water_circuit', models.CharField(blank=True, choices=[('1进1出', '1进1出'), ('2进2出', '2进2出'), ('3进3出', '3进3出'), ('1进2出', '1进2出'), ('2进3出', '2进3出'), ('1进3出', '1进3出'), ('其他', '其他')], max_length=100, null=True, verbose_name='水路')),
                ('grip_extension_length', models.FloatField(blank=True, null=True, verbose_name='握杆伸出长度')),
                ('eccentricity', models.FloatField(blank=True, null=True, verbose_name='偏心距离')),
                ('eccentricity_direction', models.CharField(blank=True, choices=[('上', '上'), ('下', '下'), ('左', '左'), ('右', '右')], max_length=100, null=True, verbose_name='偏心方向')),
                ('eccentricity_to_center', models.CharField(blank=True, choices=[('是', '是'), ('否', '否')], max_length=100, null=True, verbose_name='偏心是否回到中心面')),
                ('guidance_method', models.CharField(blank=True, choices=[('滑轨', '滑轨'), ('导杆', '导杆')], max_length=100, null=True, verbose_name='导向方式')),
                ('static_arm_eccentricity', models.FloatField(blank=True, null=True, verbose_name='静臂偏心')),
                ('static_electrode_arm_end', models.CharField(blank=True, choices=[('握杆（铝）', '握杆（铝）'), ('TIP BASE（F 型）', 'TIP BASE（F 型）'), ('握杆（SBA）', '握杆（SBA）'), ('TIP BASE（G 型）', 'TIP BASE（G 型）'), ('GUN HEAD（?36）', 'GUN HEAD（?36）'), ('GUN HEAD（?45）', 'GUN HEAD（?45）'), ('GUN HEAD（?40）', 'GUN HEAD（?40）'), ('GUN HEAD（?50）', 'GUN HEAD（?50）'), ('GUN HEAD（?60）', 'GUN HEAD（?60）'), ('握杆?45（铝）', '握杆?45（铝）'), ('握杆?50（铝）', '握杆?50（铝）'), ('特殊', '特殊'), ('其他', '其他')], max_length=255, null=True, verbose_name='静电极臂端部')),
                ('moving_arm_eccentricity', models.FloatField(blank=True, null=True, verbose_name='动臂偏心')),
                ('moving_electrode_arm_end', models.CharField(blank=True, choices=[('握杆（铝）', '握杆（铝）'), ('TIP BASE（F 型）', 'TIP BASE（F 型）'), ('握杆（SBA）', '握杆（SBA）'), ('TIP BASE（G 型）', 'TIP BASE（G 型）'), ('GUN HEAD（?36）', 'GUN HEAD（?36）'), ('GUN HEAD（?45）', 'GUN HEAD（?45）'), ('GUN HEAD（?40）', 'GUN HEAD（?40）'), ('GUN HEAD（?50）', 'GUN HEAD（?50）'), ('GUN HEAD（?60）', 'GUN HEAD（?60）'), ('握杆?45（铝）', '握杆?45（铝）'), ('握杆?50（铝）', '握杆?50（铝）'), ('特殊', '特殊'), ('其他', '其他')], max_length=255, null=True, verbose_name='动电极臂端部')),
                ('pivot_to_drive_center_dist', models.FloatField(blank=True, null=True, verbose_name='支轴到驱动中心距离')),
                ('static_arm_front_length', models.FloatField(blank=True, null=True, verbose_name='静电极臂前部长')),
                ('static_arm_front_height', models.FloatField(blank=True, null=True, verbose_name='静电极臂前部高')),
                ('moving_arm_front_length', models.FloatField(blank=True, null=True, verbose_name='动电极臂前部长')),
                ('moving_arm_front_height', models.FloatField(blank=True, null=True, verbose_name='动电极臂前部高')),
                ('pdf_file_path', models.CharField(blank=True, max_length=255, null=True, verbose_name='DWG文件路径')),
                ('step_file_path', models.CharField(blank=True, max_length=255, null=True, verbose_name='STEP文件路径')),
                ('bmp_file_path', models.CharField(blank=True, max_length=255, null=True, verbose_name='BMP文件路径')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='最后更新时间')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='products', to='clamps.category', verbose_name='所属分类')),
            ],
            options={
                'verbose_name': '焊钳产品',
                'verbose_name_plural': '焊钳产品',
            },
        ),
    ]
